package com.microservices.yucloud.api.service;

import com.microservices.yucloud.api.entity.Email;
import com.microservices.yucloud.api.mapper.EmailMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author zy
 * @date 2019-08-14 20:09
 **/
@Service
public class MockService {

    @Resource
    private EmailMapper emailMapper;

    //    @PostConstruct
    public void initTasks() {
        for (int i = 0; i < 200; i++) {
            Email email = new Email("email" + i, "subject" + i, "content" + i, "template" + i, null, 1);
            emailMapper.insertEmail(email);
        }
    }
}
